[[http://www.gnu.org/licenses/gpl-3.0.txt][file:https://img.shields.io/badge/license-GPL_3-orange.svg]]
[[http://melpa.org/#/pathify][file:http://melpa.org/packages/pathify-badge.svg]]
[[http://stable.melpa.org/#/pathify][file:http://stable.melpa.org/packages/pathify-badge.svg]]

** About

So I have =~/bin= directory in my PATH environment variable and I often
have a need to make a symlink to some script there.  And this Emacs
package serves this purpose: I press a key (bound to =pathify-dired=) in
a dired buffer and the current file is pathified (i.e., is symlinked
into my =~/bin= directory).

** Installation

*** Automatic

This package can be installed from [[http://melpa.org/][MELPA]] (with =M-x package-install= or
=M-x list-packages=).

*** Manual

For the manual installation, clone the repo, add the directory to
=load-path= and add a couple of autoloads:

#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "/path/to/pathify-dir")
(autoload 'pathify "pathify" nil t)
(autoload 'pathify-dired "pathify" nil t)
#+END_SRC

** Usage

Before using, set or customize =pathify-directory= variable (if you
don't want to use a default "~/bin" value):

#+BEGIN_SRC emacs-lisp
(setq pathify-directory "/path/to/my/dir-placed-in-PATH")
#+END_SRC

Now you may use =M-x pathify-dired= command in a dired buffer to pathify
the marked files (or the current file if nothing is marked).  For
convenience, you may bind this command to some key in a usual manner,
for example:

#+BEGIN_SRC emacs-lisp
(eval-after-load 'dired
  '(define-key dired-mode-map "P" 'pathify-dired))
#+END_SRC
